package org.example.module.utils;


import org.example.module.common.Response;

/**
 * @author yinjunwu
 */
public class ResponseUtils {

    public static <T> Response<T> success(T data) {
        return new Response<>(data);
    }

    public static <T> Response<T> success(T data, String msg) {
        return new Response<>(data, msg);
    }

    public static <T> Response<T> error(String code, String msg) {
        return new Response<>(null, code, msg);
    }
}
